import request from "@/utils/request";

// 获取购物车数据
export function getCartInfo(query) {
  return request({
    url: "cashierCart/index",
    method: "get",
    params: query,
  });
}

// 加入到购物车
export function cartAdd(data) {
  return request({
    url: "cashierCart/add",
    method: "post",
    data: data,
  });
}

// 更新购物车的商品
export function cartUpdate(data) {
  return request({
    url: "cashierCart/update",
    method: "post",
    data: data,
  });
}

// 删除购物车的商品
export function cartDelete(data) {
  return request({
    url: "cashierCart/delete",
    method: "post",
    data: data,
  });
}

// 更新购物车为会员订单
export function updateCartVip(params) {
  return request({
    url: "cashierCart/updateCartVip",
    method: "get",
    params: params,
  });
}
